package cn.topevery.garden.entity.po;

import cn.topevery.garden.entity.serializer.GeometrySerializer;
import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

import java.time.LocalDate;
import java.util.List;

/**
 * 房屋信息表
 *
 * @author code-generate
 * @date 2022-02-14
 */
@Data
@DbTable(tableName = "t_house_info")
public class HouseInfo extends BaseEntity {
        /**
     * 房屋ID
     */
    @DbTableField(columnName = "c_house_id", dbType = DbTypeEnum.VARCHAR)
    public String houseId ;

    /**
     * 房屋类型
     */
    @DbTableField(columnName = "c_house_type", dbType = DbTypeEnum.INTEGER)
    public Integer houseType ;

    /**
     * 所属绿地id
     */
    @DbTableField(columnName = "c_land_code", dbType = DbTypeEnum.VARCHAR)
    public String landCode ;

    /**
     * 户主
     */
    @DbTableField(columnName = "c_householder", dbType = DbTypeEnum.VARCHAR)
    public String householder ;

    /**
     * 户主联系方式
     */
    @DbTableField(columnName = "c_telephone", dbType = DbTypeEnum.VARCHAR)
    public String telephone ;

    /**
     * 建设开始时间
     */
    @DbTableField(columnName = "c_start_date", dbType = DbTypeEnum.DATE)
    public LocalDate startDate ;

    /**
     * 建设开始时间
     */
    @DbTableField(columnName = "c_end_date", dbType = DbTypeEnum.DATE)
    public LocalDate endDate ;

    /**
     * 面积
     */
    @DbTableField(columnName = "c_measure", dbType = DbTypeEnum.DOUBLE)
    public Double measure ;

    /**
     * 结构图
     */
    @DbTableField(columnName = "c_structure_chart", dbType = DbTypeEnum.VARCHAR)
    public String structureChart ;

    /**
     * 其他附件
     */
    @DbTableField(columnName = "c_other_file", dbType = DbTypeEnum.VARCHAR)
    public String otherFile ;

    /**
     * 描述
     */
    @DbTableField(columnName = "c_desc", dbType = DbTypeEnum.VARCHAR)
    public String desc ;

    /**
     * 房屋性质
     */
    @DbTableField(columnName = "c_nature", dbType = DbTypeEnum.VARCHAR)
    public String nature ;

    /**
     * 朝向
     */
    @DbTableField(columnName = "c_orientation", dbType = DbTypeEnum.VARCHAR)
    public String orientation ;

    /**
     * 高度
     */
    @DbTableField(columnName = "c_height", dbType = DbTypeEnum.DOUBLE)
    public Double height ;

    /**
     * 是否归档 0 否 1 是 
     */
    @DbTableField(columnName = "c_record_status", dbType = DbTypeEnum.INTEGER)
    public Integer recordStatus ;

    /**
     * 归档时间
     */
    @DbTableField(columnName = "c_record_date", dbType = DbTypeEnum.DATE)
    public LocalDate recordDate ;

    @ApiModelProperty(value = "其他附件")
    public List<GreFile> fileList;

    @DbTableField(columnName = "c_address", dbType = DbTypeEnum.VARCHAR)
    private String address;

    @DbTableField(columnName = "c_lng", dbType = DbTypeEnum.FLOAT)
    private Float lng;

    @DbTableField(columnName = "c_lat", dbType = DbTypeEnum.FLOAT)
    private Float lat;

    /**
     * 范围
     */
    @DbTableField(columnName = "c_map_ranges", dbType = DbTypeEnum.OTHER)
    @JSONField(serializeUsing = GeometrySerializer.class, deserializeUsing = GeometrySerializer.class)
    public Geometry mapRanges ;

    /**
     * 计算空间数据
     */
    @DbTableField(columnName = "c_geo_wkt", dbType = DbTypeEnum.VARCHAR)
    public String geoWkt ;
}
